package com.rockcent.mall.lib.repository;


import com.rockcent.mall.lib.domain.MerchantCouponProducts;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by oyhk on 16/2/5.
 */
@Repository
public interface CouponProductsRepository extends JpaRepository<MerchantCouponProducts, Long>, JpaSpecificationExecutor,CouponProductsRepositoryCustom {

    List<MerchantCouponProducts> findByCouponIdAndProductIdIn(Long couponId, List<Long> productIdList);

    List<MerchantCouponProducts> findByCouponId(Long id);
}